#' Online rollmad
#'
#' @param period rolling window period
#' @param constant scaling factor applied to MAD
#'
#' @return a stateful function
#' @export
#'
new_rollmad <- function(period, constant = 1.4826)
{
  mk_online_func_x("rollmad", period, constant)
}

#' Online rolliqr
#'
#' @param period rolling window period
#' @param q1 first quantile
#' @param q3 third quantile
#'
#' @return a stateful function
#' @export
#'
new_rolliqr <- function(period, q1 = 0.25, q3 = 0.75)
{
  mk_online_func_x("rolliqr", period, q1, q3)
}

#' Online cumulative iqr
#'
#' @param q1 first quantile
#' @param q3 third quantile
#' @param k parameter passed to KLL sketch
#'
#' @return a stateful function
#' @export
#'
new_rolliqr_cu <- function(q1 = 0.25, q3 = 0.75, k = 200L)
{
  mk_online_func_x("rolliqr_cu", q1, q3, k)
}

#' Online rolling Sn
#'
#' @param period rolling window period
#' @param constant scaling factor applied to Sn
#'
#' @return a stateful function
#' @export
#'
new_rollSn <- function(period, constant = 1.1926)
{
  mk_online_func_x("rollSn", period, constant)
}

#' Online rolling Qn
#'
#' @param period rolling window period
#' @param constant scaling factor applied to Qn
#'
#' @return a stateful function
#' @export
#'
new_rollQn <- function(period, constant = 2.21914)
{
  mk_online_func_x("rollQn", period, constant)
}
